<template>
  <div class="content-wrap">
    <el-button @click="myLog" type="primary" v-permission="'0'"
      >loading-service</el-button
    >
    <el-button type="primary" v-permission="'1'">删除</el-button>
    <el-button type="primary" v-permission="'2'">提交</el-button>
    <!-- <el-button type="primary" v-if="$p('1')">提交1</el-button>
    <el-button @click="handleClose" type="primary" v-if="$p('2')">
      提交2
    </el-button> -->
    <el-button @click="handleLoading" type="primary">loading...</el-button>
    <el-button @click="handleChange" type="primary">change</el-button>
  </div>
</template>

<script setup lang="ts">
// import { useLoadingService, Watermark } from "leisure-lib";
import { getCurrentInstance, onMounted, ref } from "vue";

const { proxy } = getCurrentInstance();
// const loadingService = useLoadingService();

const handleChange = () => {
  (<any>window).watermarkInstance.change("果冻");
};

const myLog = () => {
  // loadingService.show();
  // setTimeout(() => {
  //   loadingService.close();
  // }, 2000);
};

const handleClose = () => {};
const handleLoading = () => {
  console.log(proxy);
  // const loading = proxy.$loading2();
  // loading.show();
  // setTimeout(() => {
  //   loading.close();
  // }, 2000);
};
</script>

<style scoped></style>
